//
//  RepayCollectionViewCell.m
//  OneCreditTreasure
//
//  Created by iOS Grouper on 16/8/30.
//
//

#import "RepayCollectionViewCell.h"

@interface RepayCollectionViewCell()
@property (nonatomic,strong)UILabel *priceL;
@property (nonatomic,strong)UILabel *registerL;
@property (nonatomic,strong)UILabel *mouthL;

@end



@implementation RepayCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}
- (void)creatView{
    
    UIView *backView = [UIView new];
    backView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:backView];
    [backView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0 * AUTO_HEIGHT);
        make.left.mas_equalTo(self.contentView);
        make.width.mas_equalTo(self.contentView);
        make.height.mas_equalTo(60 * AUTO_HEIGHT);
        
        
    }];
    backView.layer.borderColor = [UIColor lightGrayColor].CGColor;
    backView.layer.borderWidth = 1;
    
    
    _priceL = [UILabel new];
    [backView addSubview:_priceL];
    [_priceL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(10 * AUTO_HEIGHT);
        make.left.mas_equalTo(8 * AUTO_WIDTH);
        make.height.mas_equalTo(15 * AUTO_HEIGHT);
 
    }];
    _priceL.font = [UIFont fontWithName:ZIXING size:12 * AUTO_HEIGHT];
    _priceL.text = @"应还: 18080元";
    myLBSettings(_priceL);
    
    _registerL = [UILabel new];
    [backView addSubview:_registerL];
    [_registerL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_priceL.mas_bottom).offset(10 * AUTO_HEIGHT);
        make.left.mas_equalTo(_priceL);
        make.height.mas_equalTo(_priceL);
        
    }];
    _registerL.font = [UIFont fontWithName:ZIXING size:12 * AUTO_HEIGHT];
    _registerL.text = @"状态: 已还";
    
    
    
    _mouthL = [UILabel new];
    [self.contentView addSubview:_mouthL];
    [_mouthL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(backView.mas_bottom).offset(5 * AUTO_HEIGHT);
        make.centerXWithinMargins.mas_equalTo(backView);
        make.height.mas_equalTo(15 * AUTO_HEIGHT);
        
    }];
    _mouthL.font = [UIFont fontWithName:ZIXING size:13 * AUTO_HEIGHT];
    _mouthL.text  = @"6月";
    
    
}
@end
